<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
    <title>Document</title>
</head>
<body>
    <!-- 准备一个容器 -->
    <div id="root">
      <h1 v-bind:name="props.name" :age="props.age" :sex="props.sex">{{msg}}</h1>
      <!-- 
        简洁的批量传递 直接把需要展开传递给模板属性的对象 交给v-bind属性即可
        批量传递不要书写简写
       -->
      <h1 v-bind="props">{{msg}}</h1>
    </div>

</body>
<script>
    Vue.config.productionTip = false // 阻止 Vue在启动时生成生产提示
    
    const vm = new Vue({
        el: '#root',
        data(){
            return {
                msg:'hello',
                props:{
                    name:'lisi',
                    age:'24',
                    sex:'男'
                }
            }
        }
    })
</script>

</html>